// 巨幕
let jumu = document.getElementsByClassName("jumu")[0];
    window.onload = function () {
      jumu.style.display = "block";
    };
    setTimeout(function () {
      let jumuHeight = 300;
      var timer1 = setInterval(function () {
        jumu.style.height = jumuHeight + "px";
        jumuHeight--;
        // console.log(jumu.style.height);
        jumu.style.overflow = "hidden";
        if (jumuHeight <= 200) {
          clearInterval(timer1);
        }
      }, 10);
    }, 1000);
    // 工具栏
    let tabone = document.getElementById("tabone");
    let tab1 = document.getElementsByClassName("tab1");
    let ul1 = document.getElementsByClassName("ul1")[0];
    let ul2 = document
      .getElementsByClassName("ul1")[0]
      .getElementsByTagName("li");
    // console.log(ul2);
    let yichu1 = document.getElementById("yichu1");
    let iconxia1 =document.getElementById('tabone').getElementsByClassName('icon-xia')[0]
    // let iconXia1='<span class="iconfont icon-shang1"></span>'
    // console.log(iconXia1);
    tabone.onmouseenter = function () {
      tabone.style.backgroundColor = "white";
      ul1.style.display = "flex";
      iconxia1.setAttribute('class', 'iconfont icon-shang1');
      tabone.style.border='1px solid #e6e6e6'
      // console.log(tabone);
    };
    yichu1.onmouseleave = function () {
      tabone.style.backgroundColor = "rgb(242, 242, 242)";
      ul1.style.display = "none";

      // console.log(tabone);
    };
    for (i = 0; i < ul2.length; i++) {
      let iH1 = "北京";
      iH1 = ul2[i].innerHTML;
      ul2[i].onclick = function () {
        // iH1=tab1
        tab1[0].innerHTML = iH1;
        // console.log(iH1);
        ul1.style.display = "none";
      };
    }
    tabone.onmouseleave = function () {
      tabone.style.backgroundColor = "rgb(242, 242, 242)";
      iconxia1.setAttribute('class', 'iconfont icon-xia');
      tabone.style.border='none'

    };
    let textmydang=document.getElementsByClassName('textmydang')[0]
    // console.log(tab2);
    let mydangbig=document.getElementsByClassName('mydangbig')[0]
    // console.log(mydangbig);
    let mydangtab=document.getElementsByClassName('mydangtab')[0]
    // console.log(mydangtab);
    let mydangtabzi=document.getElementsByClassName('mydangtab')[0].getElementsByTagName('div')
    // console.log(mydangtabzi);
    let mydangfen1=document.getElementsByClassName('mydangfen1')[0]
    let mydangfen2=document.getElementsByClassName('mydangfen2')[0]
    let iconxia2=document.getElementsByClassName('textmydang')[0].getElementsByClassName('icon-xia')[0]
    console.log(iconxia2);
    textmydang.onmouseenter=function(){
      mydangtab.style.display="block";
      mydangbig.style.backgroundColor='white'
      mydangbig.style.border='1px solid #e6e6e6'
      mydangfen1.style.opacity='0'
      mydangfen2.style.opacity='0'
      iconxia2.setAttribute('class', 'iconfont icon-shang1');
      
    };
    mydangbig.onmouseleave=function(){
      mydangbig.style.backgroundColor='rgb(242, 242, 242)'
      iconxia2.setAttribute('class', 'iconfont icon-xia');

      mydangtab.style.display="none";
      mydangbig.style.border='none'
      mydangfen2.style.opacity = '1'
      mydangfen1.style.opacity = '1'
    }
    for(i=0;i<mydangtabzi.length;i++){
     
      mydangtabzi[i].onmouseenter=function(){
      this.style.backgroundColor='rgb(242, 242, 242)';
      // console.log(this);
      }
      mydangtabzi[i].onmouseleave=function(){
        this.style.backgroundColor='white';
        // console.log(this);
        }
    }
    // 当当拼团tab切换
    let textdangpin=document.getElementsByClassName('textdangpin')[0]
    // console.log(tab2);
    let dangpin=document.getElementsByClassName('dangpin')[0]
    // console.log(mydangbig);
    let dangpintab=document.getElementsByClassName('dangpintab')[0]
    // console.log(mydangtab);
    let dangpintabzi=document.getElementsByClassName('dangpintab')[0].getElementsByTagName('div')
    // console.log(mydangtabzi);
    let dangpinfen=document.getElementsByClassName('dangpinfen')[0]
    // let mydangfen2=document.getElementsByClassName('mydangfen2')[0]
    let iconxiadp=document.getElementsByClassName('textdangpin')[0].getElementsByClassName('icon-xia')[0]
    textdangpin.onmouseenter=function(){
      dangpintab.style.display="block";
      dangpin.style.backgroundColor='white'
      dangpin.style.border='1px solid #e6e6e6'
      dangpinfen.style.opacity='0'
      mydangfen2.style.opacity='0'
      iconxiadp.setAttribute('class', 'iconfont icon-shang1');
      
    };
    dangpin.onmouseleave=function(){
      dangpin.style.backgroundColor='rgb(242, 242, 242)'
      iconxiadp.setAttribute('class', 'iconfont icon-xia');

      dangpintab.style.display="none";
      dangpin.style.border='none'
      mydangfen2.style.opacity = '1'
      dangpinfen.style.opacity = '1'
    }
    for(i=0;i<dangpintabzi.length;i++){
     
      dangpintabzi[i].onmouseenter=function(){
      this.style.backgroundColor='rgb(242, 242, 242)';
      // console.log(this);
      }
      dangpintabzi[i].onmouseleave=function(){
        this.style.backgroundColor='white';
        // console.log(this);
        }
    }
    // 企业采购tab切换
    let textqicai=document.getElementsByClassName('textqicai')[0]
    // console.log(tab2);
    let qicai=document.getElementsByClassName('qicai')[0]
    // console.log(mydangbig);
    let qicaitab=document.getElementsByClassName('qicaitab')[0]
    // console.log(mydangtab);
    let qicaitabzi=document.getElementsByClassName('qicaitab')[0].getElementsByTagName('div')
    // console.log(mydangtabzi);
    let qicaifen1=document.getElementsByClassName('qicaifen1')[0]
    let qicaifen2=document.getElementsByClassName('qicaifen2')[0]
    let iconxiaqc=document.getElementsByClassName('textqicai')[0].getElementsByClassName('icon-xia')[0]
    textqicai.onmouseenter=function(){
      qicaitab.style.display="block";
      qicai.style.backgroundColor='white'
      qicai.style.border='1px solid #e6e6e6'
      qicaifen1.style.opacity='0'
      qicaifen2.style.opacity='0'
      iconxiaqc.setAttribute('class', 'iconfont icon-shang1');
      
    };
    qicai.onmouseleave=function(){
      qicai.style.backgroundColor='rgb(242, 242, 242)'
      iconxiaqc.setAttribute('class', 'iconfont icon-xia');

      qicaitab.style.display="none";
      qicai.style.border='none'
      qicaifen2.style.opacity = '1'
      qicaifen1.style.opacity = '1'
    }
    for(i=0;i<qicaitabzi.length;i++){
     
      qicaitabzi[i].onmouseenter=function(){
      this.style.backgroundColor='rgb(242, 242, 242)';
      // console.log(this);
      }
      qicaitabzi[i].onmouseleave=function(){
        this.style.backgroundColor='white';
        // console.log(this);
        }
    }
    // 客户服务tab切换
    let textkefu=document.getElementsByClassName('textkefu')[0]
    // console.log(tab2);
    let kefu=document.getElementsByClassName('kefu')[0]
    // console.log(mydangbig);
    let kefutab=document.getElementsByClassName('kefutab')[0]
    // console.log(mydangtab);
    let kefutabzi=document.getElementsByClassName('kefutab')[0].getElementsByTagName('div')
    // console.log(mydangtabzi);
    let kefufen=document.getElementsByClassName('kefufen')[0]
    // let qicaifen2=document.getElementsByClassName('qicaifen2')[0]
    let iconxiakf=document.getElementsByClassName('textkefu')[0].getElementsByClassName('icon-xia')[0]
    textkefu.onmouseenter=function(){
      kefutab.style.display="block";
      kefu.style.backgroundColor='white'
      kefu.style.border='1px solid #e6e6e6'
      kefufen.style.opacity='0'
      qicaifen2.style.opacity='0'
      iconxiakf.setAttribute('class', 'iconfont icon-shang1');
      
    };
    kefu.onmouseleave=function(){
      kefu.style.backgroundColor='rgb(242, 242, 242)'
      iconxiakf.setAttribute('class', 'iconfont icon-xia');

      kefutab.style.display="none";
      kefu.style.border='none'
      qicaifen2.style.opacity = '1'
      kefufen.style.opacity = '1'
    }
    for(i=0;i<kefutabzi.length;i++){
     
      kefutabzi[i].onmouseenter=function(){
      this.style.backgroundColor='rgb(242, 242, 242)';
      // console.log(this);
      }
      kefutabzi[i].onmouseleave=function(){
        this.style.backgroundColor='white';
        // console.log(this);
        }
    }
